$fenci=fenci($subject);
$fenci_arr=json_decode($fenci,1);
$r = db_update('thread', array('tid'=>$tid), ['keywords'=>$fenci]);
foreach ($fenci_arr as  $v){
	$zd=db_find('di_tag',array('name'=>$v));
	if(empty($zd)){
		db_insert('di_tag',array('name'=>$v,'num'=>1));
	}else{
		db_update('di_tag',array('name'=>$v),array('num+'=>1));
	}

}
	
$r = db_update('thread', array('tid'=>$tid),array('image'=>$_POST['image']));